function [ gratingtable ] = APEgrating( lowerval, upperval, valtype, laserWL )
%[ gratingtable ] = APEgrating( lowerval, upperval, valtype, laserWL )
%
%  will give an overview of possible Gratings to cover the full range from
%  lowerval --> upperval in relation to the exitation Laser wavelength.
%
% INPUT     lowerval    :   lower value of range to cover
%           upperval    :   upper value of range to cover
%           valtype     :   'w' = wavelength 
%                           'r' = Raman shift
%           laserWL     :   wavelength of excitation Laser
%
% OUTPUT    gratingtable:   Overview of available Gratings and the
%                           parameters in regard to the set paramters

if nargin < 4
    help APEgrating
    return
end



%% Grating Equation (according to ANDOR)
%
%  n * lambda = d * (sin(Oi) + sin(Od))
%
%  n        = order of diffraction
%  lambda   = Incident WL
%  Oi       = Angle of incident
%  Od       = Angle of deflection
%
%
%

switch valtype
    case 'r'          % Raman shift is given
      %  convresult=(1/((1/laserWL)-(val2conv/1e7)));
     
    case 'w'          % Wavelength is given
      %  convresult=((1/laserWL)-(1/val2conv))*1e7;
        
    otherwise
        errordlg({'Please give correct input parameters!'})
        return
end

end

